package com.qs.entities;
// default package

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="Rating")
public class Rating implements java.io.Serializable {

	private static final long serialVersionUID = 5121425287982958267L;
	
	public Rating(){
		
	}
	
	@Id
	@Column(name="rating_id")
	public String ratingId;
	
	@ManyToOne
	@JoinColumn(name="feed_id")
	public Feed feed;
	
	@ManyToOne
	@JoinColumn(name="user_id")
	public User user;
	
	@Column(name="rating")
	public Integer rating;
	
	@Column(name="created_on")
	public Timestamp createdOn = new Timestamp((new Date()).getTime());	
}